﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using CVS_log_parser;

namespace CVS_log_visualiser
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var form = new Form1();// { CvsFiles = new CvsFileInfoCollection(@"c:\program files (x86)\cvsnt\cvs.exe", @"d:\users\mvorobyev\Sources\cvs\projects\ale\currentversion") };

            form.WorkingDirectoryChanged += form_WorkingDirectoryChanged;

            Application.Run(form);
        }

        static void form_WorkingDirectoryChanged(object sender, EventArgs e)
        {
            var form = sender as Form1;

            if (form == null)
                return;

            form.CvsFiles = new CvsFileInfoCollection(@"c:\program files (x86)\cvsnt\cvs.exe", form.WorkingDirectory);
        }
    }
}
